import net from './net'

let request=(url="",data={})=>{
    let post_url = net.http_url+url;
    let param = {};
    param={...param,...data};
    return new Promise((res,rjs)=>{
        wx.request({
          url: post_url,
          data:param,
          method:'POST',
          success:(result)=>{
              res(result);
          },
          fail:(result)=>{
              wx.showModal({
                title: '提示',
                content: result.errMsg,
                showCancel:false,
                complete: (res) => {
                  if (res.confirm) {
                  }
                }
              })
          }
        })
    });
}

export default{
    request,
}